Ext.define('Admin.view.order.OrderUpdateWindow', {//1.修改路径
    extend: 'Ext.window.Window',
    alias: 'order-update-window',//xtype:'order-add-window'
    width: 500,
    height: 400,
    autoShow: true,
    modal: true,
	title:'新增订餐申请',
	layout: 'fit',
	items:[{xtype:'order-update-form'}],//3.Window视图嵌套表单视图 //div
    afterRender: function () {
        var me = this;
        me.callParent(arguments);
        me.syncSize();
        Ext.on(me.resizeListeners = {
            resize: me.onViewportResize,
            scope: me,
            buffer: 50
        });
    },
    doDestroy: function () {
        Ext.un(this.resizeListeners);
        this.callParent();
    },
    onViewportResize: function () {
        this.syncSize();
    },
    syncSize: function () {
        var width = Ext.Element.getViewportWidth(),
            height = Ext.Element.getViewportHeight();
        this.setSize(500, 400);
        this.setXY([ Math.floor(width * 0.3), Math.floor(height * 0.3) ]);
    }
});
